package javaFeaures;

public class Student {
    public String name = "";   //姓名
    public int ID = 0;    //学号
    private int num = 0;   //班级
    private String gender = "";   //性别
    private int age = 0;   //年龄
    private String character = "";  //性格
    Student()
    {

    }
    public void setStudent(String name, int ID, int num, String gender, int age, String Character) {
        this.name = name;
        this.ID = ID;
        this.num = num;
        this.gender = gender;
        this.age = age;
        this.character = Character;
    }

    public String getName() {
        return name;
    }

    public int getID() {
        return ID;
    }

    public int getNum() {
        return num;
    }

    public String getGender() {
        return gender;
    }

    public int getAge() {
        return age;
    }

    public String getCharacter() {
        return character;
    }

}

class Test1 {
    public static void main(String[] args)  {
        Student stu = new Student();

        stu.setStudent("Lily",3007,3,"female",19,"Outgoing");

        System.out.println("学生1：\n我的名字叫："+stu.getName()+"\n我的学号是："+stu.getID()+"\n我的班级是："+stu.getNum()+"\n我的性别是："+stu.getGender()+"\n我的年龄是："+ stu.getAge()+"\n我的性格是："+stu.getCharacter()+"\n");

        stu.setStudent("Amy",1003,1,"female",21,"Quiet");

        System.out.println("学生2：\n我的名字叫："+stu.getName()+"\n我的学号是："+stu.getID()+"\n我的班级是："+stu.getNum()+"\n我的性别是："+stu.getGender()+"\n我的年龄是："+ stu.getAge()+"\n我的性格是："+stu.getCharacter()+"\n");

        stu.setStudent("Jack",2005,2,"male",23,"childish");

        System.out.println("学生3：\n我的名字叫："+stu.getName()+"\n我的学号是："+stu.getID()+"\n我的班级是："+stu.getNum()+"\n我的性别是："+stu.getGender()+"\n我的年龄是："+ stu.getAge()+"\n我的性格是："+stu.getCharacter()+"\n");
    }
}
